package com.ethink.warehouse.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ethink.warehouse.api.request.LogisticsTraceOrderQueryGoodsModeRequest;
import com.ethink.warehouse.api.response.LogisticsTraceOrderQueryGoodsModeResponse;
import com.ethink.warehouse.api.response.LogisticsTraceOrderQueryResponse;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.warehouse.api.info.LogisticsTraceOrderInfo;
import com.ethink.warehouse.api.request.LogisticsTraceOrderQueryRequest;
import com.ethink.warehouse.common.entity.LogisticsTraceOrder;
import org.apache.ibatis.annotations.Param;

/**
 * 物流跟进单 Mapper接口
 *
 * @author default
 * @date 2022-11-10
 */
@Mapper
public interface LogisticsTraceOrderMapper extends BaseMapper<LogisticsTraceOrder> {

    /**
     * 分页查询
     *
     * @param buildPage
     * @param request
     * @return
     */
    Page<LogisticsTraceOrderQueryResponse> queryLogisticsTraceOrder(Page buildPage, @Param("request") LogisticsTraceOrderQueryRequest request);

    /**
     * 货品模式分页查询
     *
     * @param buildPage
     * @param request
     * @return
     */
    Page<LogisticsTraceOrderQueryGoodsModeResponse> queryLogisticsTraceOrderGoodsMode(Page buildPage, @Param("request") LogisticsTraceOrderQueryGoodsModeRequest request);

    /**
     * 详情
     *
     * @param id
     * @return
     */
    LogisticsTraceOrderInfo getLogisticsTraceOrderById(@Param("id") Long id);

    /**
     * 根据流程ID获取详情
     *
     * @param flowId
     * @return
     */
    LogisticsTraceOrderInfo getLogisticsTraceOrderByFlowId(@Param("flowId") String flowId);

}